package com.miracle.film.service.impl;

import java.util.List;

import com.miracle.film.domain.FlmFilmListExt;
import com.miracle.film.mapper.FlmFilmListMapper;
import com.miracle.film.mapper.ext.FlmFilmListExtMapper;
import com.miracle.film.service.IFlmFilmListService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.miracle.film.domain.FlmFilmList;

/**
 * 影单管理Service业务层处理
 * 
 * @author miracle
 * @date 2022-07-27
 */
@Service
public class FlmFilmListServiceImpl implements IFlmFilmListService
{
    @Autowired
    private FlmFilmListMapper flmFilmListMapper;
    @Autowired
    private FlmFilmListExtMapper flmFilmListExtMapper;

    /**
     * 查询影单管理
     * 
     * @param id 影单管理主键
     * @return 影单管理
     */
    @Override
    public FlmFilmListExt selectFlmFilmListById(Integer id)
    {
        return flmFilmListExtMapper.selectFlmFilmListById(id);
    }

    /**
     * 查询影单管理列表
     * 
     * @param flmFilmList 影单管理
     * @return 影单管理
     */
    @Override
    public List<FlmFilmListExt> selectFlmFilmListList(FlmFilmList flmFilmList)
    {
        return flmFilmListExtMapper.selectFlmFilmListList(flmFilmList);
    }

    /**
     * 新增影单管理
     * 
     * @param flmFilmList 影单管理
     * @return 结果
     */
    @Override
    public int insertFlmFilmList(FlmFilmList flmFilmList)
    {
        flmFilmList.setCreateNo(SecurityUtils.getUsername());
        flmFilmList.setCreateTime(DateUtils.getNowDate());
        return flmFilmListMapper.insertFlmFilmList(flmFilmList);
    }

    /**
     * 修改影单管理
     * 
     * @param flmFilmList 影单管理
     * @return 结果
     */
    @Override
    public int updateFlmFilmList(FlmFilmList flmFilmList)
    {
        flmFilmList.setUpdateNo(SecurityUtils.getUsername());
        flmFilmList.setUpdateTime(DateUtils.getNowDate());
        return flmFilmListMapper.updateFlmFilmList(flmFilmList);
    }

    /**
     * 批量删除影单管理
     * 
     * @param ids 需要删除的影单管理主键
     * @return 结果
     */
    @Override
    public int deleteFlmFilmListByIds(Integer[] ids)
    {
        return flmFilmListMapper.deleteFlmFilmListByIds(ids);
    }

    /**
     * 删除影单管理信息
     * 
     * @param id 影单管理主键
     * @return 结果
     */
    @Override
    public int deleteFlmFilmListById(Integer id)
    {
        return flmFilmListMapper.deleteFlmFilmListById(id);
    }
}
